<template>
    <div>
        <el-tag style="margin-right: 10px"
            v-for="item in roles"
            :key="item.name"
            :type="item.name"
            effect="plain">
            {{ item.name }}
        </el-tag>
        <el-tag v-if="!roles">无</el-tag>
    </div>
</template>

<script>
    import { mapGetters } from 'vuex'
    export default {
        name: "my-role",
        computed: {
            ...mapGetters(['roles'])
        }
    }
</script>

<!-- 局部样式 -->
<style rel="stylesheet/scss" lang="scss" scoped>

</style>
